package com.ishansong.ticket.service;


import com.ishansong.ticket.exception.ServiceDaoException;
import com.ishansong.ticket.exception.ServiceException;
import com.ishansong.ticket.model.Demo;

import java.util.List;

/**
 * Created by fengmeng on 15/9/9.
 */
public interface DemoService {

    /**
     *
     * @param id
     * @return
     * @throws ServiceDaoException
     * @throws ServiceException
     */
    public Demo getDemo(Long id) throws ServiceDaoException, ServiceException;

    /**
     *
     * @param demo
     * @return
     * @throws ServiceDaoException
     * @throws ServiceException
     */
    public Long saveDemo(Demo demo) throws ServiceDaoException, ServiceException;

    /**
     *
     * @param demo
     * @throws ServiceDaoException
     * @throws ServiceException
     */
    public void updateDemo(Demo demo) throws ServiceDaoException, ServiceException;

    /**
     *
     * @param id
     * @return
     * @throws ServiceDaoException
     * @throws ServiceException
     */
    public Boolean deleteDemo(Long id) throws ServiceDaoException, ServiceException;


    /**
     * 根据年龄获取对象
     * @param age
     * @return
     * @throws ServiceDaoException
     * @throws ServiceException
     */
    public List<Demo> getDemosByAge(Integer age) throws ServiceDaoException, ServiceException;



}
